#!/bin/bash

#File:stop_kibana.sh(原创)

pid=`fuser -n tcp 5601`
pid=`echo "$pid" | awk '{gsub(/ /,"")}1'`
if [ ! -n "$pid" ] || [ ! $pid ] || [ "$pid" = "" ]; then
    echo -e "Kibana already stoped "
    exit 0
fi

# execute stop kibana
echo -e "kill -9 $pid"
kill -9 $pid

`fuser -n tcp 5601`

echo -e "Stop kibana completed"

